#ifndef STLMODELMESHESCONVERTOR_H
#define STLMODELMESHESCONVERTOR_H

#include <QVector>
#include <QMatrix4x4>
#include <QVariant>
#include <QHash>
#include <QPair>

#include <execution>

#include "ISTLModelMeshesConvertor.h"

class PointCloudConvertor : public ISTLModelMeshesConvertor
{
public:
    PointCloudConvertor();
    bool convertFrom(const QVector<Mesh> &stl_meshes) override;
    QVariant getModel() const override;
    void setColor(const QVector3D &v1_color, const QVector3D &v2_color, const QVector3D &v3_color) override;
private:
    QVector<Vertex> m_stl_model_vertices;
    QVector3D m_v1_color, m_v2_color, m_v3_color;
};

class EdgesConvertor : public ISTLModelMeshesConvertor
{
public:
    EdgesConvertor() = default;
    bool convertFrom(const QVector<Mesh> &stl_meshes) override;
    QVariant getModel() const override;
    void setColor(const QVector3D &v1_color, const QVector3D &v2_color, const QVector3D &v3_color) override;
private:
    QVector<Edge> m_stl_model_edges;
    QVector3D m_v1_color, m_v2_color, m_v3_color;
};

#endif // STLMODELMESHESCONVERTOR_H
